:root {
  /* 色彩系统 */
  --primary: #1a1a2e;
  --secondary: #16213e;
  --accent: #e94560;
  --light: #f1f1f1;
  --dark: #0f0f1b;
  --text-primary: #ffffff;
  --text-secondary: #d1d1d1;
  
  /* 间距系统 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* 圆角系统 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* 阴影系统 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
  
  /* 过渡效果 */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--space-xl);
}

/* 电影区块标题 */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  position: relative;
  padding-bottom: var(--space-md);
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--accent);
}

.section-header h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-primary);
  margin: 0;
  position: relative;
}

/* 显示更多按钮 */
.next-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  box-shadow: var(--shadow-sm);
}

.next-btn:hover {
  background: #d13354;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.next-btn:active {
  transform: translateY(0);
}

.next-btn i {
  font-size: 12px;
}

/* 电影网格布局 */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

/* 电影卡片 */
.movie-card {
  background: var(--secondary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
  height: 100%;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

/* 电影海报 */
.movie-poster {
  width: 100%;
  height: 330px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.movie-card:hover .movie-poster {
  transform: scale(1.03);
}

/* 电影信息 */
.movie-info {
  padding: var(--space-md);
  position: relative;
  z-index: 2;
  background: linear-gradient(to top, var(--secondary) 60%, transparent);
}

.movie-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.movie-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-md);
  height: 40px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.rating {
  color: #ffc107;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.year {
  color: var(--text-secondary);
  font-weight: 500;
}

/* 悬停效果增强 */
.movie-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 1;
}

.movie-card:hover::before {
  opacity: 1;
}

/* 中等屏幕 */
@media (max-width: 1200px) {
  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .movie-poster {
    height: 300px;
  }
}

/* 平板设备 */
@media (max-width: 768px) {
  .container {
    padding: var(--space-lg);
  }

  .section-header h2 {
    font-size: 24px;
  }

  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-md);
  }

  .movie-poster {
    height: 270px;
  }
}

/* 手机设备 */
@media (max-width: 576px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .movie-poster {
    height: 240px;
  }

  .movie-info {
    padding: var(--space-sm);
  }

  .movie-description {
    -webkit-line-clamp: 1;
    height: 20px;
  }
}

/* 加载动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.movie-section {
  animation: fadeIn 0.6s ease forwards;
}

.movie-section:nth-child(2) {
  animation-delay: 0.2s;
}

/* 按钮脉冲动画 */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.next-btn {
  animation: pulse 2s infinite;
}

/* 卡片悬停标签 */
.movie-card::after {
  content: '查看详情';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 3;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.movie-card:hover::after {
  opacity: 1;
}

body {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
}

.section-header h2 {
  font-family: 'Montserrat', sans-serif;
}
